﻿using System;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            //定义一个员工类，存放用户的工号、姓名、性别、学历和部门信息；
            //定义两个构造函数:
            //一个是无参构造函数，学历默认为专科；
            //一个有参构造函数，根据参数对类的属性进行初始化。

            YuanGon yuangong = new YuanGon();
            yuangong._Num = 10010;
            yuangong._Name = "张三";
            yuangong._Sex = "男";
            //yuangong._XueLi ="本科";
            yuangong._BuMen = "开发部";
            yuangong.Print();

        }
    }
    class YuanGon 
    {
        public int _Num;
        public string _Name;
        public string _Sex;
        public string _XueLi;
        public string _BuMen;

        public YuanGon() 
        {
            _XueLi = "专科";
        }

        public YuanGon(int num, string name, string sex, string xueLi, string buMen)
        {
            _Num = num;
            _Name = name;
            _Sex = sex;
            _XueLi = xueLi;
            _BuMen = buMen;
        }
        public void Print ()
        {
            Console.WriteLine("我的工号是{0},我叫{1},我的性别是{2},我的学历是{3},我的部门是{4}",_Num,_Name,_Sex,_XueLi,_BuMen);
        }


    }


}
